package io.geekidea.boot.materials.entity;


import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.geekidea.boot.common.BaseEntity;
import io.geekidea.boot.system.entity.SysUser;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * 门店实体类（tb_store_materials）
 */

@Data
@TableName("tb_store_materials")
public class Materials extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField("numbers")
    private String numbers;

    @ExcelProperty("物料名称")
    @TableField("name")
    private String name;

    @ExcelProperty("物料编码")
    @TableField("code")
    private String code;

    @ExcelProperty("物料sn号")
    @TableField("taxsh")
    private String taxsh;

    @ExcelProperty("库存数")
    @TableField("total_stock")
    private int totalStock;

    @TableField("availableInventory")
    private String availableInventory;

    @TableField("lockInventory")
    private String lockInventory;

    @TableField("secureInventory")
    private String secureInventory;

    @TableField("stockage")
    private Integer stockage;

    @TableField("warehousingTime")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime warehousingTime;

    @TableField("materialsource")
    private String materialsource;


    /**关联表字段*/
    @Schema(description = "物料类型id")
    @TableField("typeid")
    private Integer typeid;
    @Schema(description = "供应商id")
    @TableField("supplierId")
    private Integer supplierId;
    @Schema(description = "物料仓库id")
    @TableField("warehouseId")
    private Integer warehouseId;
    @Schema(description = "战区id")
    @TableField("areaId")
    private Integer areaId;
    @Schema(description = "门店id")
    @TableField("storesId")
    private Integer storesId;
    @TableField("InOrderNumber")
    private String InOrderNumber;



    /** 关联字段 */
    @ExcelProperty("物料类型名称")
    @Schema(description = "物料类型名称")
    @TableField(exist = false)
    private String typeName;
    @ExcelProperty("供应商名称")
    @Schema(description = "供应商名称")
    @TableField(exist = false)
    private String supplierName;
    @Schema(description = "供应商编码名称")
    @TableField(exist = false)
    private String supplierCode;
    @ExcelProperty("物料仓库名称")
    @Schema(description = "物料仓库名称")
    @TableField(exist = false)
    private String warehouseName;
    @ExcelProperty("战区名称")
    @Schema(description = "战区名称")
    @TableField(exist = false)
    private String areaName;
    @ExcelProperty("门店名称")
    @Schema(description = "门店名称")
    @TableField(exist = false)
    private String storeName;
    @Schema(description = "门店编码")
    @TableField(exist = false)
    private String storeCode;

    @ExcelProperty("成本价")
    @Schema(description = "成本价")
    @TableField(exist = false)
    private String costprice;
    @Schema(description = "总部物料库id")
    @TableField(exist = false)
    private int wlId;
    @Schema(description = "总金额")
    @TableField(exist = false)
    private double moneyCount;

    @TableField(exist = false)
    private String color;


}
